
#define SAFE_FREE(ptr) if (ptr){efree(ptr); ptr=NULL;}

#ifdef MEM_DEBUG
#include <glib.h>
#include "memdebug.h"

extern GHashTable   *gmemhash;
#define emalloc(s) e_malloc(gmemhash, s)
#define efree(p)   e_free(gmemhash, p)

#else

#define e_init  
#define e_destroy
#define e_malloc    malloc
#define e_free      free
#define e_print     
#define emalloc(s) malloc(s)
#define efree(p)   free(p)


#endif



